/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package MainClass;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author 威
 */
public class ShoppingCart {
    
 private double totalPrice;
 private List<Goods> goods ;
 
public ShoppingCart( List<Goods> goods){
    this.goods = goods;
}


    public List<Goods> getGoods() {
        return goods;
    }

    public void setGoods(Goods good ) {
        this.goods.add(good);
    }

public double getTotalPrice() {
	return totalPrice;
}
public void setTotalPrice(double totalPrice) {
	this.totalPrice = totalPrice;
}
//以上为get，set方法
public void add(Goods goodstemp){
	this.goods.add(goodstemp);
}


public void delete(int i ){
	this.goods.remove(i);
}
public void clear(){
	this.goods.clear();
}
public void pay(){
	
}
}
